#!/bin/sh

# setup the environment for cross compiling to uclibc for ts-7500

CROSSTOOLS=/ts-crosstool/crosstool-linux-gcc-4.0.1-glibc-2.3.5/

TS_PREFIX=/ts-root/usr/

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/ts-root/usr/lib/pkgconfig/

# compile-time

PATH=$CROSSTOOLS/bin:$PATH

CROSS_TARGET=arm-unknown-linux-gnu

CFLAGS="-march=armv4 -Os"
CC="${CROSS_TARGET}-gcc"
CXX="${CROSS_TARGET}-g++"
AR="${CROSS_TARGET}-ar"
AS="${CROSS_TARGET}-as"
LD="${CROSS_TARGET}-ld"
RANLIB="${CROSS_TARGET}-ranlib"
READELF="${CROSS_TARGET}-readelf"
STRIP="${CROSS_TARGET}-strip"

./configure --host=${CROSS_TARGET} && make
